<template>
    <div class="left">
        <ul>
            <li v-for="(item,index) in navList" :key="item.id" @click="change(index)">
                {{item}}
            </li>
        </ul>
    </div>
</template>

<script>
export default {
    props:['navList'],
    methods:{
        change(index){
            this.$bus.$emit('scrollToElement',index)
        }
    }
}
</script>